{block content}
<h1 n:block="title">Reference našich klientů</h1>
<h2>Filtrovat podle makléře</h2>
<div id="reference-filter">
    <a href="{link Reference:default}" class="reference-filter-wrapper{if !isset($activeAgent)} reference-filter-active{/if}">
        <img src="{$basePath}/images/users/all-thumb.png" alt="fotka maklere" />
        <div class="reference-filter-name">vše</div>
    </a>
    {foreach $agents as $agent}
        {if $agent->related("reference")->count() > 0}
        <a href="{link Reference:default "id" => $agent->id, "makler" => NStrings::webalize($agent->firstname .'-' . $agent->lastname)}" class="reference-filter-wrapper{if isset($activeAgent) && $agent->id == $activeAgent} reference-filter-active{/if}">
            <img src="{$basePath}/{? echo Picture::getThumbPath($agent->picture)}" alt="fotka maklere" />
            <div class="reference-filter-name">{if $agent->degree !== NULL}{$agent->degree} {/if}{$agent->firstname} {$agent->lastname}</div>
        </a>
        {/if}
    {/foreach}
</div>
<div class="clearfix"></div>
<h2>Reference</h2>
{if $references->count() > 0}
<div class="reference-wrapper{if $iterator->isLast()} reference-last{/if}" n:foreach="$references as $reference">
    <div class="reference-cite">
        {!$reference->content}
    </div>
    <div class="reference-author">({$reference->client})</div>
</div>
{else}
<p>Tento uživatel nemá zatím žádné reference.</p>
{/if}
{/block}
